public class Demo4_17 {
    public static void main(String[] args) {
        String str1 = "abcdef";
        //从指定下标进行截取
        System.out.println(str1.substring(1));
        String str2 = "   abc d";
        //去掉左右两边的空格
        String s1 = str2.trim();
        System.out.println(s1);
    }
}
